package com.basker.pisces.orm.session;

/**
 * 描述一个简单的where条件
 *
 * @author hangwen
 */
public class WhereCondition {
    private String whereSql;
    private boolean forUpdate;
    private Object[] args;
    private int[] argTypes;

    public WhereCondition(String whereSql, boolean forUpdate, Object[] args) {
        this(whereSql, forUpdate, args, new int[0]);
    }

    public WhereCondition(String whereSql, boolean forUpdate, Object[] args, int[] argTypes) {
        this.whereSql = whereSql;
        this.forUpdate = forUpdate;
        this.args = args;
        this.argTypes = argTypes;
    }

    public Object[] getArgs() {
        return args;
    }

    public int[] getArgTypes() {
        return argTypes;
    }

    public String getWhereSql() {
        return whereSql;
    }

    public boolean isForUpdate() {
        return forUpdate;
    }

}
